package main

import (
	"fmt"
)

func fun1 () {
	fmt.Println("无返回参数的func")
}


func fun2 (name string, age int) int {
	return 1
}

func fun3 (name string, age int) (ages int) {
	return 1
}


func fun (name string, age int) (string, int) {
	return "wgc", 10
}

//不定参数
func fun4 (args ... int) {

	for i := 0; i < len(args) ; i++ {
		fmt.Println(args[i])
	}
}
func fun5 (args ...interface{}) {

	for _, arg := range args {
		switch arg.(type) {
		case int:
			fmt.Printf("this is int value", arg)
		case string:
			fmt.Printf("this is string value", arg)
		case uint8:
			fmt.Printf("this is map value", arg)
		default:
			fmt.Printf("this is undon't know type", arg)
		}
	}
}



